s=eval(input())
if s < 0:
    print("error")  
else:
    salary = s - 5000
    tax_rates = [0.03, 0.1, 0.2, 0.25, 0.3, 0.35, 0.45]
    quick_deductions = [0, 210, 1410, 2660, 4410, 7160, 15160]
    brackets = [3000, 12000, 25000, 35000, 55000, 80000, float('inf')]
    for i in range(len(brackets)):
        if salary <= brackets[i]:
            tax_rate = tax_rates[i]
            quick_deduction = quick_deductions[i]
            break
    if salary <= 0:
        tax = 0
    else:
        tax = max(salary * tax_rate - quick_deduction, 0)
    after_tax_salary = s - tax
    print("应缴税款{:.2f}元，实发工资{:.2f}元。".format(tax,after_tax_salary))
